$ip  = Read-Host "Please enter public IP"
$file= "note.html"
$url = "http://${ip}:8080/upload"
Write-Host "Uploading $file to $url ..."
try {
    Invoke-RestMethod -Uri $url -Method Post -InFile $file -ContentType "multipart/form-data"
    Write-Host "Upload OK!"
    Start-Process "http://${ip}/note.html"
} catch {
    Write-Error "Upload failed: $_"
}